home *** CD-ROM | disk | FTP | other *** search
/ Almathera Ten Pack 3: CDPD 3 / Almathera Ten on Ten - Disc 3: CDPD3.iso / scope / 051-075 / scopedisk70 / rgs / rgs.doc < prev    next >
Text File  |  1995-03-19  |  35KB  |  718 lines

  1.  
  2.  
  3.  
  4.      Some spotty documentation for the RGS program Nov 28 1988
  5.  
  6.  
  7. Introduction:
  8.  
  9.    RGS is a sonic spectrum editor. It allows you to paint a sonogram using
  10. specialized 'brushes' and then synthesize the corresponding  audio
  11. waveform. It is an "evolved" version of my older program DRW/DRWj. The
  12. main added features in RGS are that there are now 256 levels of amplitude
  13. to choose from and the ability to synthesize while you are drawing in
  14. nearly real time, as well as increased user friendliness. How "real" the
  15. time is depends on the number of samples per pixel you choose...more on
  16. this later. Let's just say that it's like having a wall of 69120 sinewave
  17. generators, each with their own amplitude knob(0-255).  Note also that the
  18. samples created by real-time synthesis are  noisier than the results of
  19. the "Synth" mode. 
  20.  The version on this disk is a new version which is considerably more
  21. friendly than all the previous ones. More friendliness is added daily.
  22. Most of the improvements are :
  23.   the removal of the control comb after all these years...
  24.   the removal of the ill-concieved "flying window"
  25.   the reversion back to a low-res/non-interlaced screen.(speed reasons)
  26.   a set of (gasp) menus to replace the control comb functions..
  27.   cosmetic re-arrangement of the screen (still in progress)
  28.   ability to read old DRW, DRWJ and RGS screen formats.
  29.  
  30. Versions older than Sep 23 88 are "cloned" by me at home.(An ugly
  31. interlaced version was cloned many moons ago by Phil Burk). The JForth
  32. Cloner is a program which cuts all the unneeded JForth code out of a
  33. turnkeyed module. It performs a few other optimizations as well. The
  34. main difference is that instead of being 270K long, it is under 75K !
  35. You can definitely use this version on a 512K machine!!!
  36.  
  37.  The program presents you with a dark grey area where time is on the
  38. x-axis, frequency (actually phase increment) is on the y-axis and color
  39. represents the amplitude of the sinewave at that point in time and phase.
  40. RGS takes this  information and creates a digital sample which corresponds
  41. to the spectrum on the screen.  Sonograms may be loaded and stored, sound
  42. files may be analyzed into sonograms and resulting sounds may be saved as 
  43. IFF 8SVX files. It allows you to play the sound (both channels) with the
  44. mouse controlling frequency and stereo pan. There are two MIDI modes which
  45. send chords derived from the sonogram to MIDI sound generators  which,
  46. when  coupled with a properly constructed microtonal scale, may allow your
  47. synth to  talk or make other sampled noises (with very very low fidelity).
  48.  
  49. Caution:
  50. There is no 'UNDO'. Because it is written in Delta Research's JForth,
  51. certain operations are slower than they need to be (although I did my best
  52. with Synth and BandPass Modes and real-time synth). Filename handling may
  53. be unfriendly should you make a typo or two - I suggest you type NIL: if
  54. you can't find the right file. There are several other annoying things 
  55. that I won't mention.
  56.  
  57.   The Screen:
  58. The RGS screen is a low-res, non-interlaced 4-plane screen, (capable of 16
  59. colors). There is one window on the RGS screen, but occassionally I switch
  60. back to  Workbench's screen for data input. (this is being phased out..)
  61. RGS has several Modes, which are described below. Which mode RGS is in
  62. determines how the mouse movements and keystrokes etc. etc. are
  63. interpreted. The current Mode is displayed in the Title bar of the RGS
  64. screen.
  65.  
  66. At the top of the window is the Color Bar. In RGS amplitude is expressed
  67. as a color. Since there are 256 amplitudes but only 12 colors, the color
  68. bar groups several amplitudes into each color. You select which amplitude
  69. you  want to draw with by clicking on the color bar - the true amplitude
  70. value is written on the end of the bar. The mapping between color and
  71. amplitude can be  changed with the Zone mode (see below), and the screen
  72. is refreshed using the  new mapping with the NewScreen mode. There are two
  73. palettes I use for the Color bar: one has a radically different color for
  74. each block of amplitudes (since this makes it easy to distinguish
  75. transitions) and the other has a more-or less continuous shades-of-orange
  76. palette, which is easier on the eye (but less accurate for "understanding"
  77. the sound). You can swap from one to the other with the \ key (or the new
  78. Palette menuitem  in Process menu.)
  79.  
  80. The  interesting part of the screen is the 128 by 270 pixel drawing area. 
  81. The y-axis corresponds to phase (percieved as frequency) and the x-axis
  82. corresponds to time. The y-axis units are displayed as "samples per cycle"
  83. on the top of the drawing area. The reason that I don't show Hz or some 
  84. other standard measurement is that the sample that RGS generates can be
  85. played back at a great number of speeds, which makes "frequency" very
  86. misleading.  The 'speed' number is on the far left, wich is also known as
  87. the Amiga period number. This number is the number of color clocks (an
  88. internal timing unit) between output samples. The two numbers work
  89. together like this, for example:   To get a tone near 440Hz, 
  90.  
  91.  3579546 CC/sec/(440 cycles/sec*16 samples/cycle) = 508.458 cc/sample 
  92.  (with a line drawn on the 16.00 mark on the y-axis...)
  93.  
  94. so the period should be 508. This kind of calculation is largely
  95. irrelevant, since the period can be instantly changed with the mouse so
  96. as to retune the sound. Also contributing to the irrelevance factor is
  97. the whole purpose of RGS, which is to allow complicated sounds to be
  98. created without needing to know what the numbers are.
  99. Just in case, note that Middle C (523.3 Hz) is is 428. 
  100.  
  101.  The x-axis is also displayed on the top of the screen, expressed
  102. as the byte offset from the beginning of the sample.
  103.  
  104. If you are in Doodle mode, the drawing mode mnemonic comes after the
  105. x-axis location number. 
  106.  
  107. RGS actually has two drawing and sound areas: BufA and BufB. The one
  108. currently on the screen is noted after the drawing mnemonic.(Not seen 
  109. until you use buffer B). See 'Buffers' for more info. 
  110.  
  111.  
  112. To the side of the drawing area is a square box, which I call the Blob.
  113. The size of the blob can be changed by clicking in the Blob's box. The
  114. Blob is used as a brush or averaging area in the "doodle mode". 
  115.  
  116. Underneath the Blob is a phony prop gadget which provides some fairly
  117. constant numbers used in Doodle mode. Clicking in the box provides a
  118. number from 1 to 32 which is used in various ways.
  119.  
  120. Underneath the drawing area are a few lines of status information :
  121.  
  122. The Volume setting for the synthesis operations (changed with + and -
  123. keys).
  124.  The settings for time axis in samples per pixel (changed with the Reset
  125. and Bandpass Modes).
  126.  The state of the real-time synthesis (changed with the G key or menu
  127. item). This shows whether the real-time synthesis is on or off and what
  128. variant of it is in effect.
  129.  The state of the period lock toggle (~), which keeps the period constant
  130. for better control during a performance.
  131.  The State of the harmonic handle and the phase/time Locks.(up/down arrows
  132. and numeric pad).
  133.  The status of the MIDI modes (changed with F-keys). The meanings of this
  134. cryptic line are divulged in the section on MIDI. 
  135.  
  136.  
  137.   The MODES:
  138.  
  139. There are several states into which the program may be put: all of them
  140. are accessed via the keyboard buttons. The first letter of each mode puts
  141. you in the corresponding mode, and case is ignored. The modes are also
  142. available from Menus (the Mode menu, to be specific). When you enter the
  143. program, the Help window is displayed as an obnoxious gesture. When you
  144. hit the enter key, you will be in "Play" mode.
  145.  
  146.  
  147. The modes are:
  148.  
  149.  T)op D)oodle S)ynth P)lay R)eset  W)rite B)andpass I)input O)utput Q)uit
  150.  M)idi U)ltraMIDI Z)oneSet X)onedSynth N)ewscreen A)lternateBuffer
  151.  
  152. ( The syntax "F)oobar" dates from UCSD Pascal : it simply means you 
  153.   need only type the first letter if you don't want to use the menus.  )
  154.  
  155.  Help Key gives the screen size, current release Date
  156.           and my address and credits.
  157.  
  158. But wait.. there's more! The arrow keys and keypad buttons also are used
  159. under various modes. The MIDI modes use the "F" keys, Escape and Delete,
  160. and sprinkled about the board are a few more  flags and toggles.
  161.  
  162. P)lay mode may also be accessed via the space bar, which is handy for 
  163. stopping a lengthy S)ynth-mode, N)ewscreen, B)andpass, U)ltra and M)idi
  164. modes and a few other time consuming operations in the D)oodle mode. The
  165. space bar also shuts off the internal audio in case of neighbor's
  166. complaints.
  167.  
  168. For certain operations, when the operation is finished, you will be put in
  169. Play Mode , since it is the safest mode to be in. 
  170.  
  171. Real time (graphic) toggle:
  172.  
  173. The letter G toggles on and off the "graphic synthesis", i.e. the real
  174. time synthesis mode. This is also available in the process menu.
  175.  When G is off, RGS acts a lot like an odd paint program. To get the sound
  176. corresponding to your image, you'll need to use X)one or S)ynth modes.
  177. When G) is on, all D)oodles  are simultaneously synthesized, pixel by
  178. pixel. Also, the pan and period information (as under Play mode) is
  179. captured and held constant while you draw. There are four synthesis
  180. modes(!) which are gotten to by the non-keypad numerals 0,1,2, and 3.
  181.  
  182.   "0" means the entire sample is played in a loop (but Zoned synthesis is
  183. played in its own loop which is the size of the Zone) .
  184.  
  185.  "1" splits the screen into left and right halves (conveniently divided if
  186. you do a T)op mode), each panned and tuned as with G)'s mode 0. The two
  187. halves play in synch.
  188.  
  189.  "2" again plays the whole sample, but one channel is made slightly faster
  190. than the other. This causes some groovy phasing effects and chorusing,
  191. beating, etc. etc.
  192.  
  193.   "3" acts like "0" except that zoned synthesis does not affect  the  size
  194. of the sample being played. This lets you draw an interesting spectrum and
  195. zone-synth sections of the screen , which are instantly mixed into the
  196. sample.
  197.  
  198.  Some things don't work very well with the real time "G"  mode. For
  199. example, Inc and Dec won't have much effect unless the "prop gadget" is
  200. set above 16. This is due to the trick I use to do the synthesis, which is
  201. to take the difference between the existing amp and the new amp and add
  202. the (scaled) resulting sine to the sample. Trouble is, the scaling chops
  203. out lots of subtle changes. (If I go to a 16-bit sample, this will go
  204. away). Real-time also overloads faster, and is less accurate in general,
  205. since I refuse to sum the entire row, scale and replace it as theory
  206. demands. However, for many complicated sounds (or compositions, if you
  207. wish) it works well. The biggest kick is drawing something, then erasing
  208. parts of it and hearing that harmonic drop out of the mix!
  209.    You can improve the fidelity (at the cost of getting closer to clipped
  210. levels) by using the  "+" key to make new synthesis louder ("-" to make it
  211. softer). Doing this also improves the response of the Inc and Dec
  212. functions.
  213.  
  214.  Top mode:
  215.  
  216.   T)op Clears the screen to grey ( amplitude 0), then goes directly to    
  217.   D)oodle mode. It also wipes out the sound sample buffer. You can also
  218.   use the letter K to do this. 
  219.  
  220.  
  221.  Doodle Mode:
  222.  
  223.  D)oodle mode is the main drawing mode. It works with the Left and Right
  224. menus to allow the sonogram to be drawn and processed.  You set the
  225. drawing functions of the left and right buttons by selecting the function
  226. from the  appropriate menu.  When you draw, you use either button to get
  227. either of the two drawing functions. The active function is shown as a
  228. user-unfriendly 4 letter  mnemonic. While you draw, the phase number and
  229. the byte offset are continuously updated.
  230.  
  231. Normally, the drawing goes on where ever the "Pen" is pointing, but
  232. you can grid-lock the drawing position by using the keypad buttons. 
  233. "8" increases the frequency lock interval, while "2" decreases it.
  234. (Technically, it constrains the Y-value, and not the phase/frequency).
  235. Frequency locking is useful for constant-toned sounds without harmonic
  236. movement. "4" and "6" do the same for time locking. You can make nifty
  237.  rhythms with this feature by using "Blob" or "CpBl". "5" resets the
  238. grid to 1,1. These locks are nicely reported below the drawing area.
  239. The top constraint is 64 in both cases.
  240.  
  241. The left and right arrows can be used to increment or decrement the
  242. drawing amplitude (color) by 1, which is good for fine tuning the
  243. amplitude for a -cut operation. Also, the comma button may be used to
  244. "pick" the color beneath the pointer (as in a certain famous paint
  245. program).
  246.  
  247. Also Also, the + and - buttons control the scale factor (Volume)  for 
  248. the synthesis section. This is a number which the sum of all the
  249. samples per time period is divided by. The smaller this number, the
  250. louder the sample, and the greater the chance that it will overload
  251. and need to be clipped. However, fidelity is improved by making this a
  252. low number. 
  253.  
  254. The up and down arrows control the Harmonic Handle, which is posted above
  255. the grid numbers .. read on for more about its uses.
  256.  
  257. The Doodle mode actions are grouped in a nearly logical fashion.
  258.  
  259. Dos and Lines:
  260.  
  261.  Dot  A dot of the selected color is continuously dropped on
  262.         the screen  while the left mouse button is depressed.
  263.  
  264.  Line A continuous line is drawn while the button is down. Note that
  265.         the line cannot be drawn from right to left.. to encourage
  266.         'proper temporal flow'.
  267.  
  268.  CycL Does a ramp-like colored line, speed of cycle is based
  269.          on the Prop value.
  270.  
  271. Blobs:
  272.  
  273.  Blob The Blob of Blob box fame is deposited. (You can resize the blob
  274.         by clicking in the blob box.)
  275.  
  276.  Wipe A Blob-sized Eraser, suitable for putting on the "other" button.
  277.  
  278.  CycB Draws a Blob  while changing the colors, speed is based on
  279.          the prop value.
  280.  
  281. Ramps:
  282.  
  283.  Ramp A line at this frequency is 'ramped' up to the selected color,
  284.         then back down again. A ramp is always summed into the current
  285.         screen background. The rate at which the ramp ramps is
  286.         controlled by the phony prop gadget.(Low number == long, slow
  287.         ramp).
  288.  
  289.  R-Dn Ramps down from the color under the pointer, using the rate from
  290.         the prop gadget.
  291.  
  292.  R-Up Ramps up (backwards) from the pointer position, like ramp down.
  293.  
  294. Fill operations:
  295.  
  296.  Fill Fills this frequency with this color, until it hits a color
  297.          differing from that under the pointer.
  298.  
  299.  Fil2 Does a ramp-fill up to the pointed-to color from the colors
  300.          at the edges. Close relative of FilC and Mow. Works well
  301.          as a fancy Fill.
  302.  
  303.  FilC Fills like Fil2, except the 'peak' color is the current color,
  304.          not the replaced color.Great for doodling sounds.This will work
  305.          on grey areas as well, making little spots of color.
  306.  
  307.  Mow  Fills like Fil2, but ignores 'peaking', just ramps from 
  308.          left color to right color.( Doesn't work on grey areas).
  309.  
  310.  
  311.  
  312. Harmonic operations:
  313.  Harm   A dot in the suitable color and rate is summed into the screen
  314.         at harmonics determined by the current Frequency space settings.
  315.         The Pointer represents the harmonic specified by the Harmonic
  316.         Handle (controlled by Up and Down Arrows). It only writes forward, 
  317.         and connects points continuously. Harm can be used to create a
  318.         harmonic framework for subsequent  alterations, using color #1 as
  319.         the base color. If you are stuck generating  a long, ugly harmonic, 
  320.         hit space bar. The yellow line which pops up is a guide which
  321.         shows the end of this harmonic line's segment (i.e. how much
  322.         more it has to do before it reads the mouse again).
  323.  
  324.  
  325.  Xcld Excludes all but harmonics near this time period. The pointer
  326.          is on the Harmonic Handle (adjustable with the up and down
  327.          arrows). Xcld is good for cleaning up Bandpass filtered spectra. 
  328.          Space stops the process as with Harm. If you Xclude on top
  329.          of a Harmonic spectrum, you get comb-filter-esque effects.
  330.  
  331.  
  332.  Frmt Draws a portion of the harmonic spectrum (i.e. formant) specified
  333.         by the setting of the Harmonic Handle, and the prop gadget
  334.         value. Not as nice as I had hoped.
  335.           
  336. Averaging and filtering:
  337.  
  338.  Avg  Averages a Blob-sized area around the pointer, then averages the 
  339.         average with the non-0 colors within that area. Note: use skinny 
  340.         horizontal Blob for best results.
  341.  
  342.  Filt Averages (within the pointed-to  blob area) the colors with the 
  343.         next colors in the same frequency. Blends disparate colors. 
  344.       The formula is the phase-conserving s=( S(i-1)+2*S(i)+s(I+1)+2 )/4  
  345.  
  346. Increment and decrement:
  347.  
  348.  Inc Adds "Prop gadget amount" to the spot under the pointer.
  349.          Length is Blob's length. 
  350.  
  351.  Dec Decrements this spot by the prog gadget amount.
  352.          Length is Blob's length.
  353.  
  354.  Inc0 Increments if there is a non-0 color in the Blob
  355.          shaped area under the pointer. For making soft areas louder. 
  356.  
  357.  Dec0 Decrement, but not all the way down to 0.(Like Inc0). Because
  358.          the shape is not erased, it's easy to change amplitudes of
  359.          formants using Inc0 and Dec0. 
  360.  
  361. Copy operations:
  362.  
  363.  From sets the 'from' point for  Copy and CpBl.
  364.          You must click the left button.
  365.  
  366.  To   sets the 'to' spot for a Copy.
  367.  
  368.  Copy Copies 'pantograph'-style for those of you who remember Images,
  369.          based on the 'from area' going to the 'to' area. (area is
  370.          Blob sized). Also, no 0 levels are copied. 
  371.  CpZn Copies the current Zone to where the pointer is. The pointer 
  372.          indicates the upper left corner. (see Zone Mode)
  373.  
  374.  CpBl Copies a blob shaped area from "From" to the pointer,
  375.          ignoring "0 levels". Nice to stick "from" on the other button
  376.          and fly around, moving stuff. 
  377.  
  378. Processes:
  379.  In former versions of RGS, some of these "overall" processes were
  380. assigned to drawing tools. This seems inappropriate. So a new menu holding
  381. these processes has been made. Synth Zone and Xsynth have also been moved
  382. here, and may be dropped from the modes menu in the future. 
  383.  
  384.  -Cut removes all amplitudes quieter than the current one from the 
  385.          sonogram. Nice for cleaning BPFs. You must click the left
  386.          button on the main drawing screen. You can stop the
  387.          process with the space bar. 
  388.  
  389.  Norm    tries to maximize the final sample's  signal to noise ratio
  390.          by finding the 'loudest' column and rescaling all the amplitudes
  391.          to make that loudest volume be just below clipping (at the 
  392.          current Volume level). DANGER: with 'high' volumes this
  393.          tends to 'green' up everything if your sample is not too loud.
  394.          This works best if you are trying to tone down a clipping 
  395.          sound. (You could also re synthesize at a 'higher' Volume
  396.          number.)
  397.  
  398.  Life performs an automaton-like transformation of the sound in
  399.          the current Zone. I change the algorithm a lot, but it
  400.          has something to do with the average of the amplitudes
  401.          at certain just intervals from the current one. You must
  402.          click on the drawing area to activate it. Hitting space bar
  403.          will stop the process. Since it generally lowers amplitudes,
  404.          stick "Inc0" on the other button to pep it up. 
  405.  
  406. Zone,Synth and X-Synth are covered as modes.
  407.  
  408. The Real-time synthesis switch is also here (G).
  409.  
  410. The Palette switch is also also here. (\) You get either 'Rainbow' or
  411. 'Orange Spread'. Rainbow is good for discerning the levels, while
  412. Orange Spread looks a whole lot better.
  413.  
  414. The Period lock switch is also also here. (~) this locks the period number
  415. to whichever is in effect so you can change modes without accidentally
  416. resetting the period.
  417.  
  418. A)lternate Buffer Mode:
  419. Buffers:
  420.  
  421. To allow primative undos and 'A/B'ing, I now have two buffers, named 
  422. BufA and BufB. You can swap them with the 'A' key, or the A/B menu item.
  423. The swap is instantaneous, but the screen must regen with the new
  424. information. If there's nothing in the other buffer, or you are going to
  425. do something which regens the screen anyway, just hit the space bar. 
  426.  
  427. One more trick involving A/B is only available from the menu:
  428. you can copy a 'zone area' from the 'other' screen to this one. For
  429. example, you can keep a copy of a spectrogram in 'B' and work on
  430. pieces of it in 'A', splicing etc. etc. Impress your friends:
  431. draw a sonogram in BufA, swap to empty BufB, Zone the entire space,
  432. turn on the Real-time synth, and select copy A/B. The sound in the other
  433. buffer will be generated from the high frequencies down as it copies!
  434.  
  435.  
  436.  Zone Mode:
  437.  
  438.  This mode sets up a "Zone" which operates with the "Life" function
  439. and also with the XoneSynth funtion and CpZn. Click on one corner of the 
  440. area of interest, draw out the rectangular Zone and release. You
  441. are now in Doodle Mode.
  442.   You can also rescale the color-to-amplitude mapping by clicking 
  443. first on the new "low limit" in the color bar, and then dragging
  444. to the higher limit. All new drawing will be using that palette.
  445. You may  recreate the screen in the new mapping, using the
  446. N)ewScreen mode or erase the screen with T)op Mode.
  447.  
  448.  Newscreen Mode:
  449. This mode erases the screen and redraws the spectrum in the new colors.
  450. This allows you to see spectral details which may be too subtle
  451. to show up otherwise. For example, the B)andpass filter creates a very
  452. accurate analysis, so you can  zoom in on those low amplitude levels.
  453.  
  454.  Synth Mode:
  455.  
  456.  S)ynth erases the sound area and then creates the waveform by additive
  457. synthesis. You may cut the sound short by hitting the space bar to go
  458. directly to play mode. This mode  may be slow at times, but it depends on
  459. the current sample/pixel settings. All grey areas are skipped (their
  460. amplitude is zero) so thinly populated sonograms generate faster.
  461. Technicians will note that I am using fixed point arithmetic and a  custom
  462. sine-lookup table to make this calculation, which is merely the scaled sum
  463. of the (scaled) amplitudes at each frequency times the properly phased
  464. sine at that frequency. Simple, eh? The real-time synth's method is to add
  465. a single frequency's properly phased sine wave to the existing sample,
  466. which means that  numerous low-order bits must be  discarded, resulting in
  467. poorer quality.
  468.  
  469.  X)onesynth Mode:
  470.  
  471. This is merely a mode where the synthesis is confined to the zoned area:
  472. (see Zone Mode). This is the ultimate bandpass filter!. It loops only the
  473. synthesized portion , just like Synth, unless you are using 'synth mode
  474. #3', which is designed not to for precisely this reason .
  475.  
  476.  
  477.  Play Mode:
  478.  
  479.  P)lay plays the sound area. Moving the mouse vertically changes the Amiga
  480. 'period' (i.e. frequency.) The range of periods can be changed by the up
  481. and down arrow keys (up decreases period range, down increases it). "So,
  482. how long can that sample be, in seconds?" The longest sample RGS generates
  483. is 270*256 bytes = 69120. The new highest period is 6348 (which 
  484. corresponds to a sample rate of 563.88 Hz). 69120 samples at 563.88 Hz is
  485. about 2 minutes and 3 seconds. Keep the frequencies low and you've got a
  486. Top 40 hit!!!. 
  487.  
  488. The following modes require some names and numbers from the keyboard.
  489. I hope to eliminate this primative stuff soon. There are some hints in
  490. these windows as to what the numbers should be , but no 'Cancel' buttons.
  491. Sorry - when they become requesters, they'll be more fun.
  492.  
  493.  Reset Mode:
  494.  
  495. R)eset resets the frequency and time spaces. The maximum total number of
  496. 8-bit samples RGS can work with is 69120 (270 * 256). It flips to the
  497. workbench input console window. The first number is the number of samples
  498. each pixel on the x-axis represents (1-256). You then input the wavelength
  499. of the top frequency line in units of one hundred cycles per sample. This
  500. corresponds to the little phase  number on the screen during Doodle mode
  501. times 100. This is the sign of a lazy slob who didn't want to parse a
  502. decimal point. Thus, for 2 samples per cycle, say 200, for 4, say 400. A
  503. similar wavelength is asked for which corresponds to the lowest harmonic.
  504. I treat 0 as infinity, otherwise it should be a larger number then the
  505. upper limit: longer wavelengths mean lower frequencies. Equivalent  Hz
  506. values are displayed  after these numbers are input (assuming a period of
  507. 238 which corresponds to a sample frequency of 15040 KHz). 
  508.  
  509.  Finally, the MIDI Level is asked for, which is the maximum number of MIDI
  510. note events the MIDI modes should transmit. DX7s can have 16, while
  511. TX81Zs can only handle 8. Setting this to a low number in Ultra mode may
  512. overload your synth's MIDI buffer and cause you to lose your lease.
  513.  The screen will flip back after a second allowed for you to digest this
  514. info. The number of Samples/horizonal pixel is available for your
  515. perusal on the  screen. 
  516.  
  517. These settings apply to both buffers, but may not in the future.
  518.  
  519.  
  520. Write Mode:
  521.  
  522. W)rite writes the sound area to an IFF 8SVX sample file, for use by such
  523. programs as may use IFF samples. A filename is prompted for, the
  524. instrument name, your favorite "Period" number for tuning purposes - you
  525. can use 0 to mean the one used now in play mode -  and a number of octaves
  526. (which merely decimates the sample). Remember: it's best to keep IFF files
  527. short since a lot of programs can't handle  more than 24K. RGS can make a
  528. 64K sample, and therefore a 128K IFF file!  It's a good idea to give the
  529. IFF file a suffix which your playback program  expects, so I don't put one
  530. on.
  531.  
  532. Bandpass Mode:
  533.  
  534. B)andpass is the heterodyne filter. A name of a sound file is prompted
  535. for, then a starting offset within the file (so you may skip to an
  536. interesting section). The end offset for the file is prompted for, and 
  537. the sample size is computed from these two numbers. You can enter 0 to
  538. mean the end of the file. The frequency limits are next, exactly as they
  539. are in Reset mode. The record 'K' is asked for, which is the record size
  540. log to base 2 (i.e. 5=32, 10=1024 ...) Under 7 is pretty speedy, but
  541. decent usable work appears at about 9 or 10. Lastly, the phase and sample
  542. skip numbers are prompted for: this lets you scoot over the sample to get
  543. an overview before commiting yourself to an 8-hour bandpass analysis. You
  544. may stop the process by hitting the space bar.
  545.  This is not  an FFT because it is more geared  to the parametric nature
  546. of the program. Technically, it is a sonogram where color represents
  547. amplitude. Again, it uses fixed point arithmetic. No hokey suffix is
  548. required for this sound data file, and in fact,  any format soundfile
  549. (except compressed or inverted-byte) will be read, since I ignore the
  550. fileheaders! RGS has a more accurate Bandpass filter than DRWj, because
  551. RGS can hold a wider and more complete range of amplitudes. The quality of
  552. the filter results is dependent on the ratio of the record length to 2^K .
  553. Obviously, trying to analyze a wave longer than 1 record is futile. On the
  554. other hand, detail is lost if the record covers too many cycles. In
  555. theory, I shouldn't even attempt to analyze sounds with wavelengths
  556. greater than half the sampling frequency, but eh! sometimes interesting
  557. stuff shows up in there.
  558.  
  559.  "You canna change the laws o'physics!" - Mr. Scott.
  560.  
  561. A sneaky way to audition a sample that you may want to analyze is to  read
  562. it with Bandpass mode, give it a low "K" and hit the space bar when it
  563. starts. "Play" mode will let you play it now. In fact, you can write on it
  564. in  G) mode, thus combining high-quality samples with low quality
  565. synthesis! In double fact, you can go directly to W)ritemode and turn it
  566. into an IFF sound!
  567.  
  568.  
  569. FFTMode  is in the works .... commented out until I figure out what's
  570. wrong with it. It should make some kinds of analysis quicker.  
  571.  
  572.  
  573. O)utput  writes the sonogram to a disk file.  I)nput  reads it from  a
  574. disk file.  The R)eset parameters are also saved. I generally give these
  575. files a .RGS  suffix, to distinguish them from sample and IFF files. No
  576. suffix is automatically appended, though. RGS outputs a more accurate file
  577. than DRWj, even though it is the same size (73728 bytes). Future:
  578. compression. The official name of this new expanded format is the Poop
  579. format. I can read older formats from DRW and DRWj , RGSI, RGSH and other
  580. variants of the program with I)nput mode. This is why I prompt for
  581. "Compress or Corner" . Corner gives the lower left corner of the sample
  582. (in case the file is bigger than the screen). Compress will take a larger
  583. file and skip rows and columns until it fits on the screen. The period and
  584. phase numbers are adjusted to  take the compression into account.
  585.  
  586.  
  587.   MIDI Mode:
  588.  
  589. MIDI mode first runs through each line and picks the loudest "MIDILevel"
  590. amplitudes at all horizontal times. Then, you enter a performance mode
  591. where RGS sends up to 16 notes to the synthesizer, based on which record
  592. the mouse points at and the MIDI Level parm (see R)eset). Color becomes
  593. velocity (0-99). Holding the left button down increments the sample
  594. pointer at a steady pace. The time between transmissions depends on the
  595. "y" co-ordinate of the mouse. Note! the screen is re-written to show you
  596. who the winning frequencies  are, but the actual data is unchanged. After
  597. doing a MidiMode, you may want to  regen the screen (N).
  598.  
  599.  Even though I use "running status", your synth may  block up. If you have
  600. a microtonal synth which can be programmed to a pure scale of harmonics
  601. for all 128 notes with 16-note polyphony, you can get the synth to
  602. simulate the same harmonic space that RGS provides (although only an 8th
  603. as powerful). I have done this on  a Dx7/E!gen.2 and a TX81Z. You should
  604. (canonically) use a linear velocity sensitive sinewave as the patch to
  605. play. Obviously, other patches and scales cause other effects.
  606. Whoop-de-doo! With the aid of the BPF function and some good samples, the
  607. DX can talk!
  608.  
  609. U)ltraMIDI
  610.  
  611. This MIDI play algorithm doesn't do any preprocessing, it just takes  the
  612. pointed-to time slice, finds the harmonics (based on the  harmonic handle)
  613. and outputs up to 16 to MIDI. In short, the screen is a formant guide.
  614. Holding the mouse button down sends an advancing MIDI stream to the synth.
  615. This is like an swarm of MIDI bees. Little dots show up in your picture to
  616. show you where the MIDI notes came from.
  617.  
  618. In both of these MIDI Modes, the F Keys send certain useful real-time MIDI
  619. messages, incrementing or decrementing the number (mod 128 of course):
  620.  
  621.  -    +
  622. --------
  623.  F1 - F2 :  Patch numbers
  624.  F3 - F4 :  Pitch Bend
  625.  F5 - F6 :  Controller number (default:1=mod wheel, 2=BC, 3=DX AT, 7=VOL)
  626.  F7 - F8 :  Controller value  ( default: 0)
  627.  F9 - F10:  After Touch
  628.  
  629. also, Escape sends All Notes Off and resets the control parameters 
  630. without retransmitting them. Just toggle the Fkeys of the controls
  631. you wish to reset. 
  632.  
  633. The MIDI Channel can be incremented with the Delete key. 
  634.  
  635. All the MIDI parameters are displayed below the draw space in this order:
  636.  
  637. Limit, Channel, Program, Pitchbend, Aftertouch, Control # , Control value.
  638.  
  639. Note that swapping channels may leave notes ringing, and if the machine
  640. doesn't respond to "ALL NOTES OFF," you are in BIG NOISY trouble. Why not
  641. leave a little blank space to park the mouse while you change the channel? 
  642.  
  643. Quit Mode:
  644.  
  645. Q)uit gives you a chance to play Marble Madness or F-18 Interceptor.
  646. Maybe one day, I'll even ask if you really wanted to quit!
  647.  
  648. The Future:
  649.  RGS is an obvious relative of my other programs DRWj and DRW. It is
  650. written in Delta Research's Jforth. The new Cloner/compressor will make
  651. future versions easier to put out. It works great... much better and
  652. easier than I had feared. This is why the program is less than 75K long!
  653. Immediate improvements will be the elimination of the workbench
  654. questions, perhaps a real file requester (gasp!) and some way to specify
  655. frequency/ time limits with the mouse and not a calculator. I may also
  656. put a real FFT in , just to see if there's a big accuracy difference.
  657. I've been thinking of translating the spectrogram into a MIDIFile, for
  658. the purpose of uploading to a score writing program, in case someone
  659. wants to make an orchestra talk. Also, the I)nput mode may read IFF ILBM
  660. files (pictures to you) to answer stupids questions like, "what does it
  661. sound like when you load this picture in?"
  662.  
  663. The next related  step, if any, will probably be a vector based system
  664. written in assembler. It should also have sound double-buffering and
  665. Bigger than the screen bitmaps and perhaps 16-bit sound (calculated,
  666. anyway). There will  need to be a way to store samples larger than
  667. floppies and play samples larger than memory holds (!). If prodded, I will
  668. make the "IFF 8SVX to Mirage" transporter program, since I have a Mirage
  669. rackmount synth to test it on.
  670.  
  671.  
  672.  
  673.  
  674. Ye Olde Copyright Notice:
  675.  
  676. This is MINE ALL MINE HA HA AHA AH AHA HAHAHAHAHAHAHAHA!!
  677.  
  678. Remember: Software kills! Use this tool wisely!
  679.  
  680. Like most shareware, you are free to copy this as long as you don't charge
  681. for the copies that you give away. As a matter of fact, I tell people that
  682. they MUST copy the program if they wish to be a fully licenced user
  683. (whatever that may be.) In lieu of money, which I'm not interested in,
  684. consider calling your local educational institutes and show their music
  685. department this program. You are free to include this program in your
  686. thesis bibliography. 
  687.  If you use this program in performance (and some of the modes are now
  688. quite suitable for it) I would like to hear about it. If you are a 
  689. developer making your own Amiga music program and would like to steal some
  690. of my ideas - I stole 'em first! but call me, and you can steal some more.
  691. Part of the idea is to make sure that commercial programs similar to this
  692. are a lot more powerful and friendly.
  693.  I am in no way associated with Intelligent Music - don't expect them to
  694. answer any questions about this program. I'm just taking up their generous
  695. offer to piggyback RGS on the M Sound/Extras disk. You may want to use RGS
  696. to make 8SVX samples for M to play. I suggest you go for all 5 octaves.
  697. M also likes to have an .info file for the samples with "FILETYPE=8SVX"
  698.  in it, which RGS does not provide. Use the "see all filenames"
  699. option to find an RGS sound, or copy an existing .info file. These samples
  700. are also useful in any other 8SVX IFF Music program.
  701.  
  702.  I am after activism as a shareware concept. Money I don't need. And, it
  703. won't buy you a single thing.. there are no guarantees implied in this or
  704. any software. Neither can I say when or if the improved versions will
  705. appear.  If you send a kitchy postcard to me with your name and address,
  706. the chance that you will be informed of improvements to RGS will increase.
  707. For your information, I collect "C.T. Art - Colortone" sunsets and beach
  708. scenes  from previous decades. 
  709.  
  710.  You can get to me here:
  711.  
  712.           J Henry H Lowengard
  713.           43 W 16th st. apt 2D
  714.           NYC 10011-6320
  715.           also via IEMUG's MIDI boards:(MIDI-NET)
  716.           ENIAC (212) 751-2347, IEMUG (405) 733-3102
  717.           and CompuServe: 76625,2425
  718.